import os
import json

def create_file_if_not_exists(file_path):
    directory = os.path.dirname(file_path)
    if not os.path.exists(directory):
        print(f"Directory does not exist, creating: {directory}")
        os.makedirs(directory)
    if not os.path.exists(file_path):
        print(f"File does not exist, creating: {file_path}")
        with open(file_path, 'w', encoding='utf-8') as file:
            json.dump({}, file, ensure_ascii=False, indent=4)

def load_json(file_path):
    create_file_if_not_exists(file_path)
    with open(file_path, 'r', encoding='utf-8') as file:
        return json.load(file)

def save_json(file_path, data):
    create_file_if_not_exists(file_path)
    with open(file_path, 'w', encoding='utf-8') as file:
        json.dump(data, file, ensure_ascii=False, indent=4)